package com.yjd.bi.etl.sql;

import com.yjd.bi.comm.utils.DbNameUtils;

/**
 * 用户信息常量
 * @author yt
 *
 */
public class UserInfoSqlConstants {
	// 查询登录频率统计最大日期
	public final static String GET_MAX_LOGIN_DATE = "select MAX(statistical_date) from " + DbNameUtils.get("yjd_login_frequency");
	// 查询pc端登录人数
	public final static String GET_PC_LOGIN_ACCOUNT = "select count(*) from "+DbNameUtils.get("yjd_user_login")+" where lastlogin BETWEEN ? and ? and  channel in (0,1)";
	// 查询app端登录人数
	public final static String GET_APP_LOGIN_ACCOUNT = "select count(*) from "+DbNameUtils.get("yjd_user_login")+" where lastlogin BETWEEN ? and ? and  channel in (2,3)";
	// 查询wap端登录人数
	public final static String GET_WAP_LOGIN_ACCOUNT = "select count(*) from "+DbNameUtils.get("yjd_user_login")+" where lastlogin BETWEEN ? and ? and  channel in (4,5)";
	
	// 数据插入统计表
	public final static String  LOGIN_INSERTSQL = "insert into "+DbNameUtils.get("yjd_user_login")+"(pc_login_account,app_login_account,wap_login_account,login_account,statistical_date,create_time) VALUES (?,?,?,?,?,unix_timestamp())";
}
